/**
 * Created by Yixin on 2017/8/13.
 */
require.config({
    // 加载等待时间无限
    waitSeconds: 0,
    paths: {
        "angular": "../../lib/angular/angular",
        "angular-ui-router": "../../lib/angular-ui-router/angular-ui-router",
        "angular-ui-bootstrap":"../../lib/angular-ui-bootstrap/ui-bootstrap",
        "angular-ui-bootstrap-tpls":"../../lib/angular-ui-bootstrap/ui-bootstrap-tpls",
        "moment":"../../lib/moment/moment.min",
        "app":"app",
        "router":"router",
    },
    shim: {
        "angular":{
          exports:"angular"
        },
        "angular-ui-router": {
            deps: ["angular"],
            exports: "angular-ui-router"
        },
        "angular-ui-bootstrap":{
            deps:["angular"],
            exports:"angular-ui-bootstrap"
        },
        "angular-ui-bootstrap-tpls":{
            deps:["angular"],
            exports:"angular-ui-bootstrap-tpls"
        }
    }
});

// 启动应用
require([
    "router",
    "./directive/all-directives",
    "./controller/all-controllers",
    "./service/all-services"
],function () {
    // 手动启动angular
    angular.bootstrap(document,["admin-backend"]);
});